package com.wx.springboot.step1.controller;

import com.wx.springboot.step1.mbg.model.Brand;
import com.wx.springboot.step1.service.BrandService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 品牌管理
 */
@Api(tags = "品牌管理")
@RestController
@RequestMapping("/brand")
public class BrandController {

    @Autowired
    private BrandService brandService;

    /**
     * 品牌列表
     * @return
     */
    @ApiOperation(value = "品牌列表")
    @GetMapping("/list")
    public List<Brand> list () {
        return brandService.list();
    }


}
